using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.IO;
using System.IO.Compression;

static class Storage
{
  public static void Save(string filename,DataTable tab)
  {
    DataSet set=new DataSet("set");
    set.Tables.Add(tab);
    using(FileStream fStream=File.Open(filename,FileMode.OpenOrCreate))
    //using(DeflateStream deflate=new DeflateStream(fStream,CompressionMode.Compress))
      set.WriteXml(fStream);
  }
  public static DataTable Load(string filename)
  {
    DataSet set=new DataSet();
    using(FileStream fStream=File.Open(filename,FileMode.Open))
    //using(DeflateStream deflate=new DeflateStream(fStream,CompressionMode.Decompress))
      set.ReadXml(fStream);
    return set.Tables[0];
  }
}
